import type { VxeGridProps } from '#/adapter/vxe-table'
import { sxTypeOptions } from '#/config/options/status'
import dayjs from 'dayjs'
// 私信列表表头
export const columns: VxeGridProps['columns'] = [
    { field: 'formUsername', title: '账号名' },
    { field: 'messageTime', title: '接收时间' },
    { field: 'messageText', title: '发送内容' },
    { field: 'isReply', title: '私信状态',slots: { default: 'isReply' }},
    {
        field: 'action',
        fixed: 'right',
        slots: { default: 'action' },
        title: '操作',
        width: 180
    }
]
// 评论列表表头
export const plcolumns: VxeGridProps['columns'] = [
    { field: 'formUsername', title: '账号名' },
    { field: 'messageTime', title: '接收时间' },
    { field: 'postText', title: '帖子内容' },
     { field: 'messageText', title: '评论内容' },
    { field: 'isReply', title: '状态',slots: { default: 'isReply' }},
    {
        field: 'action',
        fixed: 'right',
        slots: { default: 'action' },
        title: '操作',
        width: 180
    }
]

export const formSchema = [
    {
        fieldName: 'username',
        label: '账号名',
        component: 'Input'
    },
    {
        fieldName: 'createTime',
        label: '接收时间',
        component: 'RangePicker',
        componentProps: {
            showTime: {
                disabledTime: false,
                defaultValue: [dayjs('00:00:00', 'HH:mm:ss'), dayjs('23:59:59', 'HH:mm:ss')]
            },
            format: 'YYYY-MM-DD HH:mm:ss',
            valueFormat: 'YYYY-MM-DD HH:mm:ss'
        }
    },
    {
        fieldName: 'isUsed', //TODO 字段
        label: '状态',
        component: 'Select',
        componentProps: {
            options: sxTypeOptions
        }
    }
]
// 关注列表表头
export const gzcolumns: VxeGridProps['columns'] = [
    { field: 'username', title: '账号名' },
    { field: 'following', title: '粉丝数量' },
    { field: 'followers', title: '关注数量' },
    { field: 'isAttention', title: '回关状态',slots: { default: 'isAttention' }},
    {
        field: 'action',
        fixed: 'right',
        slots: { default: 'action' },
        title: '操作',
        width: 180
    }
]

export const gzformSchema = [
    {
        fieldName: 'username',
        label: '账号名',
        component: 'Input'
    },
    {
        fieldName: 'createTime',
        label: '接收时间',
        component: 'RangePicker',
        componentProps: {
            showTime: {
                disabledTime: false,
                defaultValue: [dayjs('00:00:00', 'HH:mm:ss'), dayjs('23:59:59', 'HH:mm:ss')]
            },
            format: 'YYYY-MM-DD HH:mm:ss',
            valueFormat: 'YYYY-MM-DD HH:mm:ss'
        }
    },
    {
        fieldName: 'isUsed', //TODO 字段
        label: '回关状态',
        component: 'Select',
        componentProps: {
            options: [
                { label: '全部', value: 'null' },
                { label: '已回关', value: true },
                { label: '待处理', value: false }
            ]
        }
    }
]
